package com.daona.infrastructure.common;

import lombok.RequiredArgsConstructor;

import java.nio.file.FileSystems;

@RequiredArgsConstructor
public class FilePathUtil {

    public static final String FILE_SEPARATOR = FileSystems.getDefault().getSeparator();

    public static String getRealFilePath(String path) {
        return path.replace("/", FILE_SEPARATOR).replace("\\", FILE_SEPARATOR);
    }

    public static String getHttpURLPath(String path) {
        return path.replace("\\", "/");
    }
}
